package com.team.union.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.team.union.entity.User;
import com.team.union.mapper.UserMapper;
import com.team.union.service.UserService;
import com.team.union.sql.result.UserResult;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author SiZhongxia
 * @since 2018-07-16
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {

	@Autowired
	UserMapper userMapper;
	
	@Override
	public Page<UserResult> selectUserList(Page<UserResult> page) {
		page.setSearchCount(true);
		List<UserResult> list = userMapper.selectUserList(page);
		return page.setRecords(list);
	}

}
